package com.xh.rabbit_pay.dao;

import com.xh.rabbit_pay.entity.Pay;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface PayDao {
    @Insert("insert into pay (id, status, remark) " +
            "values (#{id}, #{status}, #{remark})")
    public void insert(Pay pay);

    @Select("select * from pay where id = #{payId}")
    public Pay findCode(Integer payId);

    @Update("update pay set status = #{status}, remark =  #{remark} where id = #{id}")
    public void upDate(Pay pay);
}
